/* out.h is part of VIP program
 * Written by J. Salvador Arias, 2010
 *      CONICET, INSUE, Instituto Miguel Lillo,
 *      Miguel Lillo 205, S.M. de Tucuman (4000)
 *      Tucuman, Argentina
 *      e-mail: jsalarias@csnat.unt.edu.ar
 *
 * VIP is a free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation and
 * Creative Commons.
 *
 * This file and the VIP program is distributed in the hope
 * that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * To view a copy of this license, visit
 * http://creativecommons.org/licenses/GPL/2.0/
 * or send a letter to
 * Creative Commons, 171 Second Street, Suite 300,
 * San Francisco, California, 94105, USA.
 */

#ifndef OUT_HEADER_INCLUDED
#define OUT_HEADER_INCLUDED

#include "ghead.h"
#include "biogeo.h"

#define USE_NEXUS 1
#define USE_TNT   2
#define USE_NAMES 4

#define SVG_NO_REC    0
#define SVG_WITH_REC  1
#define SVG_WITH_SUPP 2

void WriteXMLFile (gchar* fileName);
void WriteKMLFile (gchar* fileName);
void WriteXYDFile (gchar* fileName);
void WriteTABTable (gchar* fileName);
void WriteLstFile (gchar* fileName);
void WriteCllFile (gchar* fileName);
void WriteVRXFile (gchar* fileName);
void WriteXMLWithData (gchar* fileName);
void WritePhyFile (gchar* fileName);
void WriteCladoFile (gchar* fileName);

void WriteOutLog (gchar* fileName, GString* outBuffer);

void WriteSVGFile (gchar* fileName, PHYLOTREE* tree, SFLAG withRec);
void WritePhyTree (gchar* fileName, PHYLOTREE* tree);
void WriteCladoTree (gchar* fileName, PHYLOTREE* tree);

void WriteKMLRecons (gchar* fileName, GNode* refNode, SFLAG modeRecords, SFLAG modeRemoved);
void WriteKMLTree (gchar* fileName, PHYLOTREE* tree, SFLAG modeRecords, SFLAG modeRemoved);
void WriteNewickFile (gchar* fileName, PHYLOTREE* tree, SFLAG mode);

void WriteSpRichness (gchar* fileName);
void WriteRichKMLFile (gchar* fileName);
void WritePhyloDiv (gchar* fileName);
void WritePDKMLFile (gchar* fileName);
void WriteNDMMatrix (gchar* fileName);

void CheckRealStr (gchar* num);

gchar* CheckExtention (gchar* name, gchar* extention);

#endif
